/* eslint-disable */
import {
	hiprint
} from 'vue-plugin-hiprint'

// 自定义设计元素1
export const aProvider = function(ops) {
	var addElementTypes = function(context) {
		context.removePrintElementTypes("aProviderModule");
		context.addPrintElementTypes(
			"aProviderModule",
			[
				new hiprint.PrintElementTypeGroup("模板", [{
						tid: 'aProviderModule.proData',
						title: '制单日期',
						data: '2022-01-01',
						type: 'text',
						options: {
							field: 'proData',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							hideTitle: false
						}
					},
					{
						tid: 'aProviderModule.busData',
						title: '业务日期',
						data: '2022-01-01',
						type: 'text',
						options: {
							field: 'busData',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							hideTitle: false
						}
					},
					{
						tid: 'aProviderModule.deTime',
						title: '发货时间',
						data: '2022-01-01',
						type: 'text',
						options: {
							field: 'deTime',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "left",
							textContentVerticalAlign: "middle"
						}
					},
					{
						tid: 'aProviderModule.wareTime',
						title: '入库时间',
						data: '2022-01-01',
						type: 'text',
						options: {
							field: 'wareTime',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "left",
							textContentVerticalAlign: "middle"
						}
					},
					{
						tid: 'aProviderModule.businessType',
						title: '业务类型',
						data: '业务类型',
						type: 'text',
						options: {
							field: 'businessType',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							textContentVerticalAlign: "middle",

						}
					},
					{
						tid: 'aProviderModule.warehousing',
						title: '入库单号',
						data: 'XS888888888',
						type: 'text',
						options: {
							field: 'warehousing',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "left",
							textContentVerticalAlign: "middle",

						}
					},
					{
						tid: 'aProviderModule.purchaseNumber',
						title: '采购批次号',
						data: '111111',
						type: 'text',
						options: {
							field: 'purchaseNumber',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'aProviderModule.purchaseContract',
						title: '采购合同号',
						data: '111111',
						type: 'text',
						options: {
							field: 'purchaseContract',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'aProviderModule.manufacturer',
						title: '厂家合同号',
						data: '111111',
						type: 'text',
						options: {
							field: 'manufacturer',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'aProviderModule.ourUnit',
						title: '我方单位',
						data: '111111',
						type: 'text',
						options: {
							field: 'ourUnit',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'aProviderModule.supplier',
						title: '供货单位',
						data: '111111',
						type: 'text',
						options: {
							field: 'supplier',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'aProviderModule.supplyItems',
						title: '供货项目',
						data: '111111',
						type: 'text',
						options: {
							field: 'supplyItems',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'aProviderModule.warehouse',
						title: '入库仓库',
						data: '111111',
						type: 'text',
						options: {
							field: 'warehouse',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'aProviderModule.method',
						title: '提货方式',
						data: '111111',
						type: 'text',
						options: {
							field: 'method',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'aProviderModule.purchaseWeight',
						title: '采购重量',
						data: '111111',
						type: 'text',
						options: {
							field: 'purchaseWeight',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'aProviderModule.totalPrice',
						title: '采购总价',
						data: '111111',
						type: 'text',
						options: {
							field: 'totalPrice',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'aProviderModule.jyfy',
						title: '经营费用',
						data: '111111',
						type: 'text',
						options: {
							field: 'expenses',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'aProviderModule.transactionType',
						title: '交易类型',
						data: '111111',
						type: 'text',
						options: {
							field: 'transactionType',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'aProviderModule.planData',
						title: '计划付款日期',
						data: '111111',
						type: 'text',
						options: {
							field: 'planData',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'aProviderModule.salesman',
						title: '业务员',
						data: '111111',
						type: 'text',
						options: {
							field: 'salesman',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'aProviderModule.prepared',
						title: '制单人',
						data: '111111',
						type: 'text',
						options: {
							field: 'prepared',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
						
						}
					},
					{
						tid: 'aProviderModule.plate',
						title: '所属板块',
						data: '111111',
						type: 'text',
						options: {
							field: 'plate',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'aProviderModule.remarks',
						title: '备注',
						data: '111111',
						type: 'text',
						options: {
							field: 'remarks',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'aProviderModule.details',
						title: '商品明细',
						type: 'table',
						options: {
							field: 'details',
							tableHeaderRepeat: 'first',
							tableFooterRepeat: 'last',
							fields: [{
									text: '厂家',
									field: 'CJ'
								},
								{
									text: '品名',
									field: 'PM'
								},
								{
									text: '材质',
									field: 'CZ'
								},
								{
									text: '规格(mm)',
									field: 'GU'
								},
								{
									text: '尺寸(mn)',
									field: 'CH'
								},
								{
									text: '数量',
									field: 'SL'
								},
								{
									text: '单位',
									field: 'DW'
								},
								{
									text: '计重方式',
									field: 'JZFS'
								},
								{
									text: '重量',
									field: 'ZL'
								},
								{
									text: '单价',
									field: 'DJ'
								},
								{
									text: '金额',
									field: 'JE'
								},
								{
									text: '成品号',
									field: 'CPH'
								},
								{
									text: '备注',
									field: 'BZ'
								},
							],
						},
						editable: true,
						columnDisplayEditable: true, //列显示是否能编辑
						columnDisplayIndexEditable: true, //列顺序显示是否能编辑
						columnTitleEditable: true, //列标题是否能编辑
						columnResizable: true, //列宽是否能调整
						columnAlignEditable: true, //列对齐是否调整
						isEnableEditField: true, //编辑字段
						isEnableContextMenu: true, //开启右键菜单 默认true
						isEnableInsertRow: true, //插入行
						isEnableDeleteRow: true, //删除行
						isEnableInsertColumn: true, //插入列
						isEnableDeleteColumn: true, //删除列
						isEnableMergeCell: true, //合并单元格
						columns: [
							[{
									title: '厂家',
									align: 'center',
									field: 'CJ',
									width: 150
								},
								{
									title: '品名',
									align: 'center',
									field: 'PM',
									width: 150
								},
								{
									title: '材质',
									align: 'center',
									field: 'CZ',
									width: 150
								},
								{
									title: '规格(mm)',
									align: 'center',
									field: 'GU',
									width: 150
								},
								{
									title: '尺寸(mn)',
									align: 'center',
									field: 'CH',
									width: 150
								},
								{
									title: '数量',
									align: 'center',
									field: 'SL',
									width: 150
								},
								{
									title: '单位',
									align: 'center',
									field: 'DW',
									width: 150
								},
								{
									title: '计重方式',
									align: 'center',
									field: 'JZFS',
									width: 150
								},
								{
									title: '重量',
									align: 'center',
									field: 'ZL',
									width: 150
								},
								{
									title: '单价',
									align: 'center',
									field: 'DJ',
									width: 150
								},
								{
									title: '金额',
									align: 'center',
									field: 'JE',
									width: 150
								},
								{
									title: '成品号',
									align: 'center',
									field: 'CPH',
									width: 150
								},
								{
									title: '备注',
									align: 'center',
									field: 'BZ',
									width: 150
								}

							]
						]
						
					},
					
				]),
				new hiprint.PrintElementTypeGroup("拖拽列表", [{
						tid: 'aProviderModule.creater',
						title: '文本',
						data: '李四',
						type: 'text',
						options: {
							field: 'creater',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "left",
							textContentVerticalAlign: "middle"
						}
					},
					{
						tid: 'aProviderModule.printDate',
						title: '长文',
						data: '处处充满创造性',
						type: 'text',
						options: {
							field: 'printDate',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "left",
							textContentVerticalAlign: "middle"
						}
					},

				]),

				new hiprint.PrintElementTypeGroup("辅助", [{
						tid: 'aProviderModule.hline',
						title: '横线',
						type: 'hline'
					},
					{
						tid: 'aProviderModule.vline',
						title: '竖线',
						type: 'vline'
					},
					{
						tid: 'aProviderModule.rect',
						title: '矩形',
						type: 'rect'
					},
					{
						tid: 'aProviderModule.oval',
						title: '椭圆',
						type: 'oval'
					}
				])
			]
		);
	};
	return {
		addElementTypes: addElementTypes
	};
};

export default 
[{
	name: 'A设计',
	value: 'aProviderModule',
	type: 1,
	f: aProvider()
}]


